package com.xuecheng.base.exception;

import lombok.Data;

/**
 * @ClassName XueChengPlusException
 * @Description TODO
 * @Author kiku
 * @Date 2024/7/10 16:07
 * @Version 1.0
 */
@Data
public class XueChengPlusException extends RuntimeException{
   private String errMessage;

    public XueChengPlusException(String message) {
        super(message);
        this.errMessage=message;
    }

    public XueChengPlusException() {
        super();
    }
    public static void cast(String errMessage){
        throw new XueChengPlusException(errMessage);
    }
    public static void cast(CommonError commonError){
        throw new XueChengPlusException(commonError.getErrMessage());
    }
}
